import * as actionTypes from './constants'

const defauleState = {
    rankList: [],
    enterLoading: true
}

const reducer = (state = defauleState, action) => {
    switch (action.type) {
        case actionTypes.CHANGE_LOADING:
            return {
                ...state,
                enterLoading:action.data
            }
        case actionTypes.CHANGE_RANK_LIST:
            return {
                ...state,
                rankList:action.data
            }
        default:
            return state;
    }
}

export default reducer